<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>盒子模型演示</title>
    <style>
        .outer{
            border: red 1px solid;
            width: 202px;
            height: 202px;
            /*设置内边距，会导致外边框的变化*/
            /*padding: 50px;*/
        }
        .inter{
            border: green 1px solid;
            width: 100px;
            height: 100px;
            /*设置通用上右下左外边距*/
            /*margin: 50px;*/

            /*依次设置上右下左外边距*/
            /*margin-top: 50px;
            margin-right: 50px;
            margin-bottom: 50px;
            margin-left: 50px;*/

            /*通用单独上右下左外边距*/
            /*margin: 70px 35px 30px 65px;*/

            /*自动计算外边距并水平居中*/
            /*margin: auto;*/
        }
    </style>
</head>
<body>
    <div class="outer">
        <div class="inter"></div>
    </div>

</body>
</html>